<?php
	require "../dao/teacher_dao.php";
	
	$stumark = [];
	$stumark["mark_tid"] = $_POST["mark_tid"];
	$stumark["mark_stuid"] = implode(',', $_POST["mark_stuid"]);
	$stumark["mark"] = implode(',', $_POST["mark"]);
	
	$flag = insertStumark($stumark);
	
	if($flag){
?>
		<script>
			alert("添加成功。。。。");
		</script>
<?php
	}else{
?>
		<script>
			alert("添加失败。。。。");
			location.href = 'T_insertStu_mark.php';
		</script>
<?php
	}
?>